From 9787d88dcf3e7c78c544840f420d3f194d80e631 Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Tue, 6 May 2008 15:31:15 +0100 Subject: [PATCH] xend: Only import OpenSSL package when it is required. Signed-off-by: Keir Fraser --- tools/python/xen/web/tcp.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/python/xen/web/tcp.py b/tools/python/xen/web/tcp.py index f444c208d3..0ffb3fb0db 100644 --- a/tools/python/xen/web/tcp.py +++ b/tools/python/xen/web/tcp.py @@ -22,8 +22,6 @@ import re import socket import time -from OpenSSL import SSL - import connection from xen.xend.XendLogging import log @@ -82,6 +80,7 @@ class SSLTCPListener(TCPListener): def createSocket(self): + from OpenSSL import SSL # make a SSL socket ctx = SSL.Context(SSL.SSLv23_METHOD) ctx.set_options(SSL.OP_NO_SSLv2) -- 2.30.2